registerMiddleware

Registers a middleware to the list of middlewares.

Parameters

middleware

a KlarityMiddleware object representing the middleware to register.

Throws

if the middleware is already registered in the list.